import { defineStore } from 'pinia'
import { postUploadFileRequest } from '@/service/module/upload/upload'

interface IUploadListdemo {
  id: number
  filename: string
  originalName: string
  size: number
  url: string
}

export const useUploadListStore = defineStore('uploadlist', {
  state: () => ({
    UploadListdemo: [] as IUploadListdemo[],

    id: 0,
  }),

  getters: {
    // GET_TRAIN() {
    //     this.getTrainList()
    // }
  },
  actions: {
    //行测技巧列表数据
    async uploadListResultAction() {
      const res = await postUploadFileRequest()
      // console.log(res, '下载文件列表页数据')

      this.UploadListdemo = res.data.data
    },
  },
  // persist: true,
})
